Pass --help to the most nested subcommand
authorOwen W. Taylor <otaylor@fishsoup.net>
Tue, 23 Sep 2014 19:31:30 +0000 (15:31 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Thu, 25 Sep 2014 07:08:06 +0000 (03:08 -0400)
'ostree admin <x> --help' and 'ostree admin instutil <x> --help' should
give help on the deepest subcommand, not on 'ostree admin'.

https://bugzilla.gnome.org/show_bug.cgi?id=737194

src/ostree/ot-admin-builtin-instutil.c
src/ostree/ot-builtin-admin.c

index 66ea80edd47c986450cded7b8621be1c77967aa1..9e5712009af7eb8e6c7e13017934966c74ad403c 100644 (file)
@@ -117,7 +117,7 @@ ot_admin_builtin_instutil (int argc, char **argv, OstreeSysroot *sysroot, GCance
 
   argc = out;
 
-  if (subcommand_name == NULL || want_help)
+  if (subcommand_name == NULL)
     {
       subcommand = admin_instutil_subcommands;
       g_print ("usage: ostree admin instutil COMMAND [options]\n");
index 6db97ca49f83cbb7d2c12baedf9eb4fe53e033d1..533f15f9e914ee2e650e40bc4ccb1d1a1029adf8 100644 (file)
@@ -145,7 +145,7 @@ ostree_builtin_admin (int argc, char **argv, OstreeRepo *repo, GCancellable *can
 
   argc = out;
 
-  if (subcommand_name == NULL || want_help)
+  if (subcommand_name == NULL)
     {
       subcommand = admin_subcommands;
       g_print ("usage: ostree admin --sysroot=PATH COMMAND [options]\n");